package com.xxx.redifrct;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ServletDome01 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("ServletDome01");
        resp.setHeader("s02", "s02");
        resp.getWriter().write("ServletDome");
        //重定向到ServletDome02
//        resp.setHeader("Location","/Web02_war_exploded/s03");
//        resp.setStatus(302);
        resp.sendRedirect("/Web02_war_exploded/s03");
    }
}
